3.9.56 \(\int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx\) [856]

3.9.56.1 Optimal result
3.9.56.2 Mathematica [A] (verified)
3.9.56.3 Rubi [A] (verified)
3.9.56.4 Maple [A] (verified)
3.9.56.5 Fricas [F(-1)]
3.9.56.6 Sympy [F]
3.9.56.7 Maxima [F(-2)]
3.9.56.8 Giac [F(-2)]
3.9.56.9 Mupad [F(-1)]

3.9.56.1 Optimal result

Integrand size = 27, antiderivative size = 219 \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\frac {(4 c e f-4 c d g+b e g+2 c e g x) \sqrt {a+b x+c x^2}}{4 c e^2}-\frac {\left (b^2 e^2 g+8 c^2 d (e f-d g)-4 c e (b e f-b d g+a e g)\right ) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{8 c^{3/2} e^3}+\frac {\sqrt {c d^2-b d e+a e^2} (e f-d g) \text {arctanh}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e^3} \]

output
-1/8*(b^2*e^2*g+8*c^2*d*(-d*g+e*f)-4*c*e*(a*e*g-b*d*g+b*e*f))*arctanh(1/2* 
(2*c*x+b)/c^(1/2)/(c*x^2+b*x+a)^(1/2))/c^(3/2)/e^3+(-d*g+e*f)*arctanh(1/2* 
(b*d-2*a*e+(-b*e+2*c*d)*x)/(a*e^2-b*d*e+c*d^2)^(1/2)/(c*x^2+b*x+a)^(1/2))* 
(a*e^2-b*d*e+c*d^2)^(1/2)/e^3+1/4*(2*c*e*g*x+b*e*g-4*c*d*g+4*c*e*f)*(c*x^2 
+b*x+a)^(1/2)/c/e^2
 
3.9.56.2 Mathematica [A] (verified)

Time = 0.88 (sec) , antiderivative size = 212, normalized size of antiderivative = 0.97 \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\frac {2 \sqrt {c} \left (e \sqrt {a+x (b+c x)} (b e g+2 c (2 e f-2 d g+e g x))-8 c \sqrt {-c d^2+b d e-a e^2} (-e f+d g) \arctan \left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+x (b+c x)}}{\sqrt {-c d^2+e (b d-a e)}}\right )\right )+\left (-b^2 e^2 g+8 c^2 d (-e f+d g)+4 c e (b e f-b d g+a e g)\right ) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+x (b+c x)}}\right )}{8 c^{3/2} e^3} \]

input
Integrate[((f + g*x)*Sqrt[a + b*x + c*x^2])/(d + e*x),x]
 
output
(2*Sqrt[c]*(e*Sqrt[a + x*(b + c*x)]*(b*e*g + 2*c*(2*e*f - 2*d*g + e*g*x)) 
- 8*c*Sqrt[-(c*d^2) + b*d*e - a*e^2]*(-(e*f) + d*g)*ArcTan[(Sqrt[c]*(d + e 
*x) - e*Sqrt[a + x*(b + c*x)])/Sqrt[-(c*d^2) + e*(b*d - a*e)]]) + (-(b^2*e 
^2*g) + 8*c^2*d*(-(e*f) + d*g) + 4*c*e*(b*e*f - b*d*g + a*e*g))*ArcTanh[(b 
 + 2*c*x)/(2*Sqrt[c]*Sqrt[a + x*(b + c*x)])])/(8*c^(3/2)*e^3)
 
3.9.56.3 Rubi [A] (verified)

Time = 0.56 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.05, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {1231, 27, 1269, 1092, 219, 1154, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx\)

\(\Big \downarrow \) 1231

\(\displaystyle \frac {\sqrt {a+b x+c x^2} (b e g-4 c d g+4 c e f+2 c e g x)}{4 c e^2}-\frac {\int \frac {d e g b^2+4 c d (e f-d g) b-4 a c e (2 e f-d g)+\left (8 d (e f-d g) c^2-4 e (b e f-b d g+a e g) c+b^2 e^2 g\right ) x}{2 (d+e x) \sqrt {c x^2+b x+a}}dx}{4 c e^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\sqrt {a+b x+c x^2} (b e g-4 c d g+4 c e f+2 c e g x)}{4 c e^2}-\frac {\int \frac {d e g b^2+4 c d (e f-d g) b-4 a c e (2 e f-d g)+\left (8 d (e f-d g) c^2-4 e (b e f-b d g+a e g) c+b^2 e^2 g\right ) x}{(d+e x) \sqrt {c x^2+b x+a}}dx}{8 c e^2}\)

\(\Big \downarrow \) 1269

\(\displaystyle \frac {\sqrt {a+b x+c x^2} (b e g-4 c d g+4 c e f+2 c e g x)}{4 c e^2}-\frac {\frac {\left (-4 c e (a e g-b d g+b e f)+b^2 e^2 g+8 c^2 d (e f-d g)\right ) \int \frac {1}{\sqrt {c x^2+b x+a}}dx}{e}-\frac {8 c (e f-d g) \left (a e^2-b d e+c d^2\right ) \int \frac {1}{(d+e x) \sqrt {c x^2+b x+a}}dx}{e}}{8 c e^2}\)

\(\Big \downarrow \) 1092

\(\displaystyle \frac {\sqrt {a+b x+c x^2} (b e g-4 c d g+4 c e f+2 c e g x)}{4 c e^2}-\frac {\frac {2 \left (-4 c e (a e g-b d g+b e f)+b^2 e^2 g+8 c^2 d (e f-d g)\right ) \int \frac {1}{4 c-\frac {(b+2 c x)^2}{c x^2+b x+a}}d\frac {b+2 c x}{\sqrt {c x^2+b x+a}}}{e}-\frac {8 c (e f-d g) \left (a e^2-b d e+c d^2\right ) \int \frac {1}{(d+e x) \sqrt {c x^2+b x+a}}dx}{e}}{8 c e^2}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\sqrt {a+b x+c x^2} (b e g-4 c d g+4 c e f+2 c e g x)}{4 c e^2}-\frac {\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-4 c e (a e g-b d g+b e f)+b^2 e^2 g+8 c^2 d (e f-d g)\right )}{\sqrt {c} e}-\frac {8 c (e f-d g) \left (a e^2-b d e+c d^2\right ) \int \frac {1}{(d+e x) \sqrt {c x^2+b x+a}}dx}{e}}{8 c e^2}\)

\(\Big \downarrow \) 1154

\(\displaystyle \frac {\sqrt {a+b x+c x^2} (b e g-4 c d g+4 c e f+2 c e g x)}{4 c e^2}-\frac {\frac {16 c (e f-d g) \left (a e^2-b d e+c d^2\right ) \int \frac {1}{4 \left (c d^2-b e d+a e^2\right )-\frac {(b d-2 a e+(2 c d-b e) x)^2}{c x^2+b x+a}}d\left (-\frac {b d-2 a e+(2 c d-b e) x}{\sqrt {c x^2+b x+a}}\right )}{e}+\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-4 c e (a e g-b d g+b e f)+b^2 e^2 g+8 c^2 d (e f-d g)\right )}{\sqrt {c} e}}{8 c e^2}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\sqrt {a+b x+c x^2} (b e g-4 c d g+4 c e f+2 c e g x)}{4 c e^2}-\frac {\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-4 c e (a e g-b d g+b e f)+b^2 e^2 g+8 c^2 d (e f-d g)\right )}{\sqrt {c} e}-\frac {8 c (e f-d g) \sqrt {a e^2-b d e+c d^2} \text {arctanh}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{e}}{8 c e^2}\)

input
Int[((f + g*x)*Sqrt[a + b*x + c*x^2])/(d + e*x),x]
 
output
((4*c*e*f - 4*c*d*g + b*e*g + 2*c*e*g*x)*Sqrt[a + b*x + c*x^2])/(4*c*e^2) 
- (((b^2*e^2*g + 8*c^2*d*(e*f - d*g) - 4*c*e*(b*e*f - b*d*g + a*e*g))*ArcT 
anh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(Sqrt[c]*e) - (8*c*Sqr 
t[c*d^2 - b*d*e + a*e^2]*(e*f - d*g)*ArcTanh[(b*d - 2*a*e + (2*c*d - b*e)* 
x)/(2*Sqrt[c*d^2 - b*d*e + a*e^2]*Sqrt[a + b*x + c*x^2])])/e)/(8*c*e^2)
 

3.9.56.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 1092
Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2   Subst[I 
nt[1/(4*c - x^2), x], x, (b + 2*c*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a 
, b, c}, x]
 

rule 1154
Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Sym 
bol] :> Simp[-2   Subst[Int[1/(4*c*d^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, ( 
2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c 
, d, e}, x]
 

rule 1231
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(d + e*x)^(m + 1)*(c*e*f*(m + 2*p + 2) 
 - g*(c*d + 2*c*d*p - b*e*p) + g*c*e*(m + 2*p + 1)*x)*((a + b*x + c*x^2)^p/ 
(c*e^2*(m + 2*p + 1)*(m + 2*p + 2))), x] - Simp[p/(c*e^2*(m + 2*p + 1)*(m + 
 2*p + 2))   Int[(d + e*x)^m*(a + b*x + c*x^2)^(p - 1)*Simp[c*e*f*(b*d - 2* 
a*e)*(m + 2*p + 2) + g*(a*e*(b*e - 2*c*d*m + b*e*m) + b*d*(b*e*p - c*d - 2* 
c*d*p)) + (c*e*f*(2*c*d - b*e)*(m + 2*p + 2) + g*(b^2*e^2*(p + m + 1) - 2*c 
^2*d^2*(1 + 2*p) - c*e*(b*d*(m - 2*p) + 2*a*e*(m + 2*p + 1))))*x, x], x], x 
] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && GtQ[p, 0] && (IntegerQ[p] ||  !R 
ationalQ[m] || (GeQ[m, -1] && LtQ[m, 0])) &&  !ILtQ[m + 2*p, 0] && (Integer 
Q[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])
 

rule 1269
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g/e   Int[(d + e*x)^(m + 1)*(a + b*x + 
 c*x^2)^p, x], x] + Simp[(e*f - d*g)/e   Int[(d + e*x)^m*(a + b*x + c*x^2)^ 
p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] &&  !IGtQ[m, 0]
 
3.9.56.4 Maple [A] (verified)

Time = 0.72 (sec) , antiderivative size = 335, normalized size of antiderivative = 1.53

method result size
risch \(\frac {\left (2 c e g x +b e g -4 c d g +4 c e f \right ) \sqrt {c \,x^{2}+b x +a}}{4 c \,e^{2}}+\frac {\frac {\left (4 a c \,e^{2} g -b^{2} e^{2} g -4 b c d e g +4 b c \,e^{2} f +8 c^{2} d^{2} g -8 c^{2} d e f \right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{e \sqrt {c}}+\frac {8 \left (a \,e^{2} g d -a \,e^{3} f -b \,d^{2} e g +b \,e^{2} f d +c \,d^{3} g -c \,d^{2} e f \right ) c \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}}{8 c \,e^{2}}\) \(335\)
default \(\frac {g \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )}{e}+\frac {\left (-d g +e f \right ) \left (\sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}+\frac {\left (b e -2 c d \right ) \ln \left (\frac {\frac {b e -2 c d}{2 e}+c \left (x +\frac {d}{e}\right )}{\sqrt {c}}+\sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\right )}{2 e \sqrt {c}}-\frac {\left (e^{2} a -b d e +c \,d^{2}\right ) \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}\right )}{e^{2}}\) \(407\)

input
int((g*x+f)*(c*x^2+b*x+a)^(1/2)/(e*x+d),x,method=_RETURNVERBOSE)
 
output
1/4*(2*c*e*g*x+b*e*g-4*c*d*g+4*c*e*f)*(c*x^2+b*x+a)^(1/2)/c/e^2+1/8/c/e^2* 
((4*a*c*e^2*g-b^2*e^2*g-4*b*c*d*e*g+4*b*c*e^2*f+8*c^2*d^2*g-8*c^2*d*e*f)/e 
*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))/c^(1/2)+8*(a*d*e^2*g-a*e^3*f- 
b*d^2*e*g+b*d*e^2*f+c*d^3*g-c*d^2*e*f)*c/e^2/((a*e^2-b*d*e+c*d^2)/e^2)^(1/ 
2)*ln((2*(a*e^2-b*d*e+c*d^2)/e^2+(b*e-2*c*d)/e*(x+d/e)+2*((a*e^2-b*d*e+c*d 
^2)/e^2)^(1/2)*((x+d/e)^2*c+(b*e-2*c*d)/e*(x+d/e)+(a*e^2-b*d*e+c*d^2)/e^2) 
^(1/2))/(x+d/e)))
 
3.9.56.5 Fricas [F(-1)]

Timed out. \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Timed out} \]

input
integrate((g*x+f)*(c*x^2+b*x+a)^(1/2)/(e*x+d),x, algorithm="fricas")
 
output
Timed out
 
3.9.56.6 Sympy [F]

\[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\int \frac {\left (f + g x\right ) \sqrt {a + b x + c x^{2}}}{d + e x}\, dx \]

input
integrate((g*x+f)*(c*x**2+b*x+a)**(1/2)/(e*x+d),x)
 
output
Integral((f + g*x)*sqrt(a + b*x + c*x**2)/(d + e*x), x)
 
3.9.56.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Exception raised: ValueError} \]

input
integrate((g*x+f)*(c*x^2+b*x+a)^(1/2)/(e*x+d),x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(e>0)', see `assume?` for more de 
tails)Is e
 
3.9.56.8 Giac [F(-2)]

Exception generated. \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Exception raised: TypeError} \]

input
integrate((g*x+f)*(c*x^2+b*x+a)^(1/2)/(e*x+d),x, algorithm="giac")
 
output
Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument Type
 
3.9.56.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(f+g x) \sqrt {a+b x+c x^2}}{d+e x} \, dx=\int \frac {\left (f+g\,x\right )\,\sqrt {c\,x^2+b\,x+a}}{d+e\,x} \,d x \]

input
int(((f + g*x)*(a + b*x + c*x^2)^(1/2))/(d + e*x),x)
 
output
int(((f + g*x)*(a + b*x + c*x^2)^(1/2))/(d + e*x), x)